package com.csun.dsms.service.impl;

import com.csun.dsms.comment.core.support.BaseService;
import com.csun.dsms.mapper.HgInstructionDataMapper;
import com.csun.dsms.mapper.HgUserMapper;
import com.csun.dsms.model.huang.HgInstructionListData;
import com.csun.dsms.model.huang.HgQueryDto;
import com.csun.dsms.model.huang.HgUser;
import com.csun.dsms.model.huang.HgYearMonthVo;
import com.csun.dsms.service.HgInstructionDataService;
import com.csun.dsms.service.HgUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class HgInstructionDataServiceImpl extends BaseService<HgInstructionListData> implements HgInstructionDataService {

    @Resource
    private HgInstructionDataMapper hgInstructionDataMapper;


    @Override
    public Integer addData(HgInstructionListData hgInstructionListData) {
        hgInstructionListData.setCreatedTime(new Date());
        return hgInstructionDataMapper.insert(hgInstructionListData);
    }

    @Override
    public List<HgInstructionListData> queryInstructionList(HgQueryDto hgQueryDto) {
        return hgInstructionDataMapper.queryListWithPage(hgQueryDto);
    }

    @Override
    public Integer edit(HgInstructionListData hgInstructionListData) {
        return hgInstructionDataMapper.updateByPrimaryKey(hgInstructionListData);
    }
}
